Skip to main content

Filters

Filters can be applied to queries by editing the JSON body of API requests. Filters available in the API vary for indicator category and are all optional. If the filter syntax of a request is not recignised by the API, the query will ignore the filter.

Before filtering any given attribute, ensure that the respective parameter for that filter has been selected. For example, for province or territory filtering, the query string of the API endpoint must specify geo=provinces_territories, such that the API can query the required table/aggregation in the Data Hub:

https://lmic-datahub-prod-gw-d6ow9n6v.uc.gateway.dev/lmi?geo=provinces_territories

Additionally, before filtering, add the following header to let the API know to expect a JSON body in the request:

--header 'Content-Type: application/json'

Table of Filters

Note that where a table record is "n/a" the parameter is used for that given indicator category.

FilterDescriptionAccepted Values - Standard IndicatorsAccepted Values - Job PostingsAccepted Values - Work Requirements
geoCan filter by a number of geographic settings{"province_territory":[“ON”, “AB”]}, {"economic_region":["Montréal"]},     {"cma":["Montréal"]}{"province_territory":[“ON”, “AB”]}, {"economic_region":["Montréal"]},     {"cma":["Montréal"]},     {"census_division":["Montréal"]}{"province_territory":[“ON”, “AB”]}, {"economic_region":["Montréal"]},     {"cma":["Montréal"]},     {"census_division":["Montréal"]}
nocFilter by NOC{"noc" = ["2123","2344"]}, {"noc"=["4']}{"noc" = ["2123","2344"]}, {"noc"=["4']}{"noc" = ["2123","2344"]}, {"noc"=["4']}
naicsFilter by NAICS"naics" = {[23, 35]}n/an/a
work_requirementFilter by Work Requirementn/an/a“Data Analysis”